Wrapper class header file. Data structures etc.
//////////////////////////////////////////////////////////////////////
//
// File name: OlyCam.h
// Author:    Alex AKA Sanya
// Version:   0.2, Alpha forever
//
// Last edited : 16 Sep 2001
//
// Olympus digital cameras API DLL wrapper class
// for OLCAMAPI.DLL 69,632 bytes, ver 07.02.00   2:00 
//
//////////////////////////////////////////////////////////////////////
//
// This code may contain bugs and inaccuracies. 
// This source code is not based on any official API info from Olympus.
// No any original code from Olympus was used to develop this code.
// This code is not supported in any way.
// The author has no any responsibility for any damage to your equipment
// resulted from the usage of this code.
// 
// Currently tested for both USB and COM-ports for C3000Z
//
// 
//
//////////////////////////////////////////////////////////////////////

#include 


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// watchdog timer for command list semaphore
#define DLL_NAME "Olcamapi.dll"

#define CMD_INIT_INTERFACE	0x000
#define CMD_CLOSE_INTERFACE	0x100

typedef int ( WINAPI* lpF1)();
typedef int ( WINAPI* lpF2)(int);
typedef int ( WINAPI* lpF3)(void *);
typedef int ( WINAPI* lpF4)(int, void *);
typedef int ( WINAPI* lpF5)(int, int, int); // callback proc
typedef int ( WINAPI* lpF6)(int, int);
typedef int ( WINAPI* lpF7)(void *, int);
typedef int ( WINAPI* lpF8)(void *, void * , int);


// Camera summary data: 32 bytes with copies of 8 other registers 
// get_current_setting
struct cam_settings {
	int resolution;		//0: Reg 1 (Resolution) 
	int flash_mode;		//1: Reg 35 (LCD brightness) or Reg 7 (Flash mode) 
	int unknown;		//2: Reg 10 (Frames taken) or Unknown 
	int unknown1;		//3: Unknown (0) 
	WORD battery;		//4: Unknown (0) or Reg 16 (Battery capacity) 
	WORD handle;
	int picture_count;			//5: Unknown (0) or Reg 10 (Frames taken) 
	int remaining_count;//6: Unknown (0) or Reg 11 (Frames left) 
	int unknown3;		//7: Number of animations taken 
};
typedef cam_settings *pcam_settings;

struct cam_settings2 {
	int resolution;		
	int bright_flash;	 
	int frames_taken;	
	int unknown1;	 
	WORD handle1;	
	WORD handle2;
	int frames;		
	int frames_left;
	int animations;	
};
typedef cam_settings2 *pcam_settings2;

// Exposure Compensation 8 bytes 
// get/set_exposure_bias
struct exposure_bias {
	int compensation; // 0: compensation value -20 to +20 (tenths) 
	int UNKNOWN1;	//: 10 
};
typedef exposure_bias *pexposure_bias; 

#define FOCAL_LENGTH_MAX 195
#define FOCAL_LENGTH_MIN 65

// Effective zoom in tenths of millimeters: 8 bytes 
// get/set_focal_length
struct zoom_info {
	int focal_length; // focal length in units 65..195=6.5..19.5mm
	int units_per_mm; // units per millimeter, 10 default, ignored for set_focal_length
};
typedef zoom_info *pzoom_info;

struct folder_info {
	char name[12];
	int unknown;	//16
	int time_value;	//
};
typedef folder_info *pfolder_info;

struct take_picture_info {
	int xx1; // 1 resolution?
	int xx2; // 0
	int xx3; // 
	int xx4; // 
	int xx5; //
	int xx6; //
	int compression; // 3
	int metering_mode; // 5
};
typedef take_picture_info *ptake_picture_info;

// get_time
struct time_rec {
	int ss;				// Seconds
	int mm;				// Minutes
	int hh;				// Hours
	int dd;				// Date, 1-based
	int mon;			// Month, 0-based
	int yy;				// Year since 1900
	int xx;				// 0 ??? Day of the week
	int dd_absolute;	// day since January, 1
	int xxxx;			// 0 ???
};
typedef time_rec *ptime_rec;

struct mem_info
{
	int cardno;    //0x00, Always 1
	UINT unknown[7];//
	UINT something; //0x24, 0x4E4150 for 8MB Oly,0 for 64MB Sandisk and 2MB Fuji
	UINT unknown1[7];
	UINT something1;//0x48
	UINT something2;//0x4c
	int spacefree;	//0x50
	UINT unknown3;  //0x54
};

struct pic_info {
	int picture_size;  
	int thumbnail_size;
	int audio_size;    
	WORD resolutionY;    
	WORD resolutionX;
	int protect;    
	int time_value; 
	int sequence;		// number in sequence  
	int animationtype;  // 1 - 10ms, 2 - 20ms 
};
typedef pic_info *ppic_info;


// Communication port constants used by CamSetPort
#define	PORT_COM1		0x01
#define	PORT_COM2		0x02
#define	PORT_COM3		0x03
#define	PORT_COM4		0x04
#define	PORT_USB		0xA0

// Port speed constants
#define	SPEED_DEFAULT	0x00 // default/initial(19200bps)
#define	SPEED_9600		0x01 // 9600bps
#define	SPEED_19200		0x02 // 19200bps
#define	SPEED_38400		0x03 // 38400bps
#define	SPEED_57600		0x04 // 57600bps
#define	SPEED_115200	0x05 // 115200bps
#define	SPEED_230000	0x06 // 230000bps

//Exp. meter: 
//set_metering_mode
#define	EXP_CENTER_WEIGHTED			0x02;
#define	EXP_SPOT					0x03;
#define	EXP_MULTI_ELEMENT_MATRIX	0x05;

// get/set_audio parameter constants
//
#define	AUDIO_XX		0x00
#define	AUDIO_ON		0x01
#define	AUDIO_OFF		0x02

// get_beep_mode parameter constants
// _set returns error code 15 
// _get returns 0 always
#define	BEEP_OFF	0x00
#define	BEEP_LOW	0x01
#define	BEEP_HIGH	0x02


// special mode
//
#define	CMODE_STD				0x00
#define	CMODE_BW				0x01
#define	CMODE_SEPIA				0x02
#define	CMODE_WHITEBOARD		0x03
#define	CMODE_BLACKBOARD		0x04



// Flash modes
#define	FLASH_AUTO		0x00
#define	FLASH_ON		0x01
#define	FLASH_OFF		0x02
#define	FLASH_REDEYE	0x03
#define	FLASH_SLOWSYNC1	0x04
#define	FLASH_SLOWSYNC2	0x05

// LCD date formats
#define	LCD_DATE_YMD	0x01
#define	LCD_DATE_MDY	0x02
#define	LCD_DATE_DMY	0x03

// ISO ratings
#define	ISO_AUTO	0x00
#define	ISO_100		0x01
#define	ISO_200		0x02
#define	ISO_400		0x03

// get/set_focus
// Focus mode: 1 - Macro, 2 - Normal, 3 - Infinity/Fisheye
#define	FOCUS_MACRO		0x01
#define	FOCUS_NORMAL	0x02
#define	FOCUS_INFINITY	0x03


// set_special_function
//Bitmap: 1 - AEL/WBL, 2 - Fisheye, 4 - Wide, 8 - Manual zoom, 
//16 - B/W, 256 - 1.25x, 512 - 1.6x, 768 - 2.0x, 1024 - 2.5x, 1280 - off
// works only 8, 0..256 acceptable

//get_sharpness
#define	SHARP_HARD	0x00
#define	SHARP_SOFT	0x00
#define	SHARP_NORM	0x00

// resolution modes
// get/set_resolution	
#define	RES_640x480_NORM	0x01 // SQ2
#define	RES_640x480_HIGH	0x04 // SQ2
#define	RES_1024x768_NORM	0x05 // SQ2
#define	RES_1024x768_HIGH	0x06 // SQ2

#define	RES_1280x960_NORM	0x07 // SQ1
#define	RES_1280x960_HIGH	0x08 // SQ1
#define	RES_1600x1200_NORM	0x09 // SQ1
#define	RES_1600x1200_HIGH	0x0A // SQ1

#define	RES_2048x1536_NORM	0x02 // HQ, HQ video
#define	RES_2048x1536_HIGH	0x03 // SHQ

#define	RES_640x480_TIFF	0x21 // TIFF
#define	RES_1024x768_TIFF	0x22 // TIFF
#define	RES_1280x960_TIFF	0x23 // TIFF
#define	RES_1600x1200_TIFF	0x24 // TIFF
#define	RES_2048x1536_TIFF	0x25 // TIFF

// White balance modes
#define	WB_AUTO			0x00
#define	WB_DAYLIGHT		0x01
#define	WB_OVERCAST		0x02
#define	WB_TUNGSTEN		0x03
#define	WB_FLUORESCENT	0x04
#define	WB_FLASH		0x05
#define	WB_WHITE_PRESET	0x06

// set_timer_led  
#define	LED_OFF		0x00
#define	LED_ON		0x01
#define	LED_BLINK	0x02

// Language: 3 - english, 4 - french, 5 - german, 6 - italian, 8 - spanish, 10 - dutch
// get/set_lcd_disp_language
#define	LCD_LANG_ENGLISH	0x01

// LCD operation mode: 1 - Off, 2 - Record, 3-Play, 6-Thumbnail
// get_cd, control_lcd iControl
#define	LCD_UNKNOWN			0x00
#define	LCD_OFF				0x01
#define	LCD_PREVIEW			0x02
#define	LCD_ON_STORED		0x03
#define	LCD_UNKNOWN1		0x04
#define	LCD_THUMBNAIL1		0x05
#define	LCD_THUMBNAIL2		0x06
#define	LCD_SELECT_NEXT		0x07
#define	LCD_SELECT_PREV		0x08
#define	LCD_DIALOG_DELETE	0x09

///////////////////////////////////////////////////////////////////////
// command codes - used:
// - in string maps as keys
// - in command queues
// ....
#define OLYCMD_ZOOM_STEP_PLUS 	"ZOOM_STEP_PLUS"
#define OLYCMD_ZOOM_STEP_MINUS	"ZOOM_STEP_MINUS"
#define OLYCMD_TAKE_PICTURE		"TAKE_PICTURE"
#define OLYCMD_FLUSH_CARD		"FLUSH_CARD"
#define OLYCMD_CHANGE_FUN		"CHANGE_FUN"
#define OLYCMD_CHANGE_RES		"CHANGE_RES"
#define OLYCMD_NEXT				"NEXT"
#define OLYCMD_PREV				"PREV"

// flash card to disk dump masks
#define CARD_DUMP_PIC 0x01 // get pictures 
#define CARD_DUMP_THN 0x02 // get thumbnails 
#define CARD_DUMP_WAV 0x04 // get audio 
#define CARD_DUMP_MOV 0x08 // get movies


class COlyCmd : public CObject
{
public:
	CString cmd;
	CString param1;
	CString param2;
	COlyCmd( CString c, CString p1, CString p2);
	~COlyCmd();
};

class COlyCommands : public CObject
{
public:
	CMapStringToString m_cmdnames; // text labels for interface
	COlyCommands();					// fill in the labels map etc
	virtual ~COlyCommands();
};

// Olympus cameras API DLL wrapper class
class COlyCam  
{
private:
    HMODULE hLibrary; // Olcamapi.dll handle
//
// DLL function prototypes
//
	lpF6 DLL_control_lcd;
	lpF1 DLL_diag_lcd_disp;
	lpF1 DLL_erase_all;
	lpF2 DLL_erase_folder;
	lpF1 DLL_erase_last;
	lpF2 DLL_erase_opf;
	lpF2 DLL_erase_select;
	lpF1 DLL_error;
	lpF1 DLL_execute_diag;
	lpF2 DLL_format_memory_card;
	lpF1 DLL_get_audio;
	lpF7 DLL_get_audio_buffer;
	lpF2 DLL_get_audio_size;
	lpF1 DLL_get_battery_status;
	lpF1 DLL_get_beep_mode;
	lpF3 DLL_get_cam_type;
	lpF1 DLL_get_cgain;
	lpF3 DLL_get_color_bal;
	lpF1 DLL_get_color_mode;
	lpF1 DLL_get_com_handle;
	lpF1 DLL_get_compression;
	lpF3 DLL_get_current_setting;
	lpF3 DLL_get_current_setting_2;
	lpF1 DLL_get_datablock_size;
	lpF1 DLL_get_diag_awb_info;
	lpF1 DLL_get_diag_buffer;
	lpF1 DLL_get_diag_camera_info;
	lpF1 DLL_get_diag_info;
	lpF1 DLL_get_diag_lcd_info;
	lpF1 DLL_get_diag_lens_info;
	lpF1 DLL_get_diag_long;
	lpF1 DLL_get_digital_zoom;
	lpF1 DLL_get_exposure;
	lpF3 DLL_get_exposure_bias;
	lpF1 DLL_get_flash_mode;
	lpF3 DLL_get_focal_length;
	lpF1 DLL_get_focus;
	lpF4 DLL_get_folder_info;
	lpF7 DLL_get_folder_name;
	lpF1 DLL_get_folder_number;
	lpF1 DLL_get_free_mem;
	lpF1 DLL_get_function_available;
	lpF3 DLL_get_id;
	lpF1 DLL_get_iso_speed_ratings;
	lpF1 DLL_get_last_setting;
	lpF1 DLL_get_lcd;
	lpF1 DLL_get_lcd_brightness;
	lpF1 DLL_get_lcd_contrast;
	lpF1 DLL_get_lcd_date_format;
	lpF1 DLL_get_lcd_disp_direction;
	lpF1 DLL_get_lcd_disp_language;
	lpF1 DLL_get_lcd_picture_number;
	lpF1 DLL_get_lcd_power_down;
	lpF1 DLL_get_lcd_power_down_2;
	lpF1 DLL_get_lcd_select_count;
	lpF1 DLL_get_lcd_select_pictures;
	lpF1 DLL_get_light_source;
	lpF3 DLL_get_maker;
	lpF3 DLL_get_memory_info;
	lpF1 DLL_get_memory_select;
	lpF1 DLL_get_memory_status;
	lpF1 DLL_get_metering_mode;
	lpF1 DLL_get_opf_count;
	lpF1 DLL_get_opf_info;
	lpF1 DLL_get_packet_delay;
	lpF8 DLL_get_picture_audio_buffer;
	lpF7 DLL_get_picture_buffer;
	lpF1 DLL_get_picture_count;
	lpF6 DLL_get_picture_file;
	lpF7 DLL_get_picture_file_name;
	lpF4 DLL_get_picture_info;
	lpF1 DLL_get_picture_info_tag;
	lpF2 DLL_get_picture_size;
	lpF2 DLL_get_protect_mode;
	lpF1 DLL_get_pwr_down;
	lpF6 DLL_get_raw_file;
	lpF1 DLL_get_remaining_count;
	lpF1 DLL_get_resolution;
	lpF3 DLL_get_serial_no;
	lpF1 DLL_get_session_time;
	lpF1 DLL_get_sharpness;
	lpF1 DLL_get_special_function;
	lpF1 DLL_get_state;
	lpF3 DLL_get_take_picture_info;
	lpF7 DLL_get_thumbnail_buffer;
	lpF6 DLL_get_thumbnail_file;
	lpF2 DLL_get_thumbnail_size;
	lpF3 DLL_get_time;
	lpF1 DLL_get_time_value;
	lpF1 DLL_get_tone_curve;
	lpF3 DLL_get_version;
	lpF1 DLL_get_ygain;
	lpF1 DLL_load_file_data;
	lpF1 DLL_load_firmware;
	lpF1 DLL_load_opf_data;
	lpF1 DLL_load_picture_data;
	lpF6 DLL_protect_picture;
	lpF1 DLL_push_comm_open;
	lpF1 DLL_pwr_off;
	lpF1 DLL_ready;
	lpF2 DLL_record_audio;
	lpF1 DLL_reset_dll;
	lpF2 DLL_session_enabled;
	lpF2 DLL_set_audio;
	lpF2 DLL_set_beep_mode;
	lpF2 DLL_set_cgain;
	lpF2 DLL_set_color_bal;
	lpF2 DLL_set_color_mode;
	lpF2 DLL_set_compression;
	lpF2 DLL_set_datablock_size;
	lpF2 DLL_set_debug;
	lpF1 DLL_set_default_params;
	lpF1 DLL_set_diag_awb_info;
	lpF1 DLL_set_diag_buffer;
	lpF1 DLL_set_diag_long;
	lpF2 DLL_set_digital_zoom;
	lpF2 DLL_set_exposure;
	lpF2 DLL_set_exposure_bias;
	lpF2 DLL_set_flash_mode;
	lpF3 DLL_set_focal_length;
	lpF2 DLL_set_focus;
	lpF3 DLL_set_folder_name;
	lpF3 DLL_set_id;
	lpF2 DLL_set_iso_speed_ratings;
	lpF2 DLL_set_last_setting;
	lpF2 DLL_set_lcd_brightness;
	lpF2 DLL_set_lcd_contrast;
	lpF2 DLL_set_lcd_date_format;
	lpF2 DLL_set_lcd_disp_direction;
	lpF2 DLL_set_lcd_disp_language;
	lpF2 DLL_set_lcd_power_down;
	lpF1 DLL_set_lcd_power_down_2;
	lpF3 DLL_set_lcd_string;
	lpF2 DLL_set_light_source;
	lpF2 DLL_set_memory_select;
	lpF2 DLL_set_metering_mode;
	lpF2 DLL_set_packet_delay;
	lpF2 DLL_set_port;
	lpF1 DLL_set_pwr_down;
	lpF2 DLL_set_resolution;
	lpF2 DLL_set_session_time;
	lpF2 DLL_set_sharpness;
	lpF2 DLL_set_special_function;
	lpF2 DLL_set_speed;
	lpF1 DLL_set_take_picture_info;
	lpF2 DLL_set_time;
	lpF2 DLL_set_timer_led;
	lpF1 DLL_set_tone_curve;
	lpF2 DLL_set_ygain;
	lpF7 DLL_setup_callback;
	lpF1 DLL_setup_monitor;
	lpF1 DLL_store_pic;
	lpF1 DLL_take_pic;
	lpF1 DLL_take_preview;
	lpF1 DLL_write_loaded_data;
	lpF1 DLL_ComClose;
	lpF1 DLL_ComGetHandle;
	lpF1 DLL_ComOpen;
	lpF1 DLL_ComPutc;
	lpF1 DLL_ComReadBufToQuiet;
	lpF1 DLL_ComReadTimed;
	lpF1 DLL_ComSetBaud;
	lpF1 DLL_ComSetFlow;
	lpF1 DLL_ComSleepMS;
	lpF1 DLL_ComUsbOpen;
	lpF1 DLL_ComWrite;

// internal state variables
	
	BOOL DebugOn;
	CString DebugFileName;
	FILE* debugfile;

	int StartDebug( CString DebugFileName);
	int PauseDebug();
	int ResumeDebug();
	int StopDebug();

	
public:
	int DumpCardToPath(CString sPath);
	CString func2text(int iFunc);
	CString iso2text(int iISO);
	CString flashmode2text(int iMode);
	CString resolution2text(int iRes);

	int m_speed;
	int m_initialized;
	int m_interface;
	CString m_id;

	
	int m_busy;
	int m_picture_count;
	int m_error;
	int m_control_lcd;
	int m_control_lcd_pic;

	int m_ygain;
	int m_timer_led;
	int m_time;
	int m_special_function;
	int m_sharpness;
	int m_session_time;
	int m_resolution;
	int m_memory_select;
	int m_light_source;
	int m_lcd_power_down;
	int m_lcd_disp_language;
	int m_lcd_disp_direction;
	int m_lcd_date_format;
	int m_lcd_contrast;
	int m_lcd_brightness;
	int m_last_setting;
	int m_iso_speed_ratings;
	int m_focal_length; int m_focal_length_step;
	int m_flash_mode;
	int m_exposure_bias;
	int m_exposure;
	int m_digital_zoom;
	int m_datablock_size;
	int m_compression;
	int m_color_mode;
	int m_color_bal;
	int m_cgain;
	int m_beep_mode;
	int m_audio;
	int m_port;
	int m_metering_mode;
	
		
	COlyCam();
	COlycam(int iPort, int iSpeed);
	virtual ~COlyCam();

	void LoadDLL();
	int	dll_loaded();
	void refresh();  // refresh data from camera

	int dump_settings();

////////////////////////////////////////////////////////////
	int control_lcd( int iControl, int iPicIndex);
// Addr:10004FA7 Ord:   2 (0002h) Name: _diag_lcd_disp@4
	int erase_all();
	int erase_folder(int iFolder);
	int erase_last();
	int erase_opf(int iIndex);
	int erase_select(int iPicture);
	int error();
// Addr:100054F7 Ord:   9 (0009h) Name: _execute_diag@4
	int format_memory_card(int iCardNumber);
	int get_audio();
	int get_audio_buffer( int iPicture, void * pBuffer);
	int get_audio_size( int iPicture);
	int get_battery_status();
	int get_beep_mode();
	int get_cam_type(PCHAR strType);
	int get_cgain();
	int get_color_bal(void * pBuf);
	int get_color_mode();
	int get_com_handle();
	int get_compression();
	int get_current_setting(pcam_settings pSettings);
	int get_current_setting_2(pcam_settings2 pSettings);
	int get_datablock_size();
// Addr:10005339 Ord:  25 (0019h) Name: _get_diag_awb_info@4
// Addr:10004E02 Ord:  26 (001Ah) Name: _get_diag_buffer@4
// Addr:1000517F Ord:  27 (001Bh) Name: _get_diag_camera_info@4
// Addr:10004FC1 Ord:  28 (001Ch) Name: _get_diag_info@4
// Addr:100050C4 Ord:  29 (001Dh) Name: _get_diag_lcd_info@4
// Addr:1000543C Ord:  30 (001Eh) Name: _get_diag_lens_info@4
// Addr:10004E2E Ord:  31 (001Fh) Name: _get_diag_long@0
	int get_digital_zoom();
	int get_exposure();
	int get_exposure_bias(pexposure_bias pExpBias);
	int get_flash_mode();
	int get_focal_length( pzoom_info pZoomInfo);
	int get_focus();
	int get_folder_info( int iFolder, pfolder_info FolderInfo);
	int get_folder_name( int iFolder, PCHAR strFolderName);
	int get_folder_number();
	int get_free_mem();
// Addr:1000468E Ord:  42 (002Ah) Name: _get_function_available@4
	int get_id( );
	int get_iso_speed_ratings();
	int get_last_setting();
	int get_lcd();
	int get_lcd_brightness();
	int get_lcd_contrast();
	int get_lcd_date_format();
	int get_lcd_disp_direction();
	int get_lcd_disp_language();
	int get_lcd_picture_number();
	int get_lcd_power_down();
// Addr:10004162 Ord:  54 (0036h) Name: _get_lcd_power_down_2@8
	int get_lcd_select_count();
// Addr:10004D0A Ord:  56 (0038h) Name: _get_lcd_select_pictures@4
	int get_light_source();
	int get_maker( PCHAR strMaker);
	int get_memory_info(mem_info * pstructMemInfo);
	int get_memory_select();
	int get_memory_status();
	int get_metering_mode();
	int get_opf_count();
// Addr:10005664 Ord:  64 (0040h) Name: _get_opf_info@8
	int get_packet_delay();
	int get_picture_audio_buffer( int iPicture, void * pPictureBuffer, void * pAudioBuffer);
	int get_picture_buffer( int iPicture, void * pBuffer);
	int get_picture_count();
	int get_picture_file( int iPicIndex, HFILE hFile);
	int get_picture_file_name( int iPicIndex, PCHAR lpstrFileName);
	int get_picture_info(int iPicIndex, pic_info *  pPicInfo);
// Addr:100049B9 Ord:  72 (0048h) Name: _get_picture_info_tag@8
	int get_picture_size(int iPicture);
	int get_protect_mode(int iPicture);
// Addr:100038F1 Ord:  75 (004Bh) Name: _get_pwr_down@8
	int get_raw_file( int iPicIndex, HFILE hFile);
	int get_remaining_count();
	int get_resolution();
	int get_serial_no(PCHAR lpstrSerial);
	int get_session_time();
	int get_sharpness();
	int get_special_function();
	int get_state();
	int get_take_picture_info( ptake_picture_info pInfo);
	int get_thumbnail_buffer( int iPicture, void * pBuffer);
	int get_thumbnail_file( int iPicIndex, HFILE hFile);
	int get_thumbnail_size(int iPicIndex);
	int get_time(time_rec * pctrTime  );
	int get_time_value();
	int get_tone_curve();
	int get_version( PCHAR pstrVersion);
	int get_ygain();
// Addr:10004F2E Ord:  93 (005Dh) Name: _load_file_data@8
// Addr:10004E3F Ord:  94 (005Eh) Name: _load_firmware@4
// Addr:10005744 Ord:  95 (005Fh) Name: _load_opf_data@8
// Addr:10004F58 Ord:  96 (0060h) Name: _load_picture_data@8
	int protect_picture(int iPicIndex, int iProtect);
// Addr:100057BB Ord:  98 (0062h) Name: _push_comm_open@8
	int pwr_off();
	int ready();
	int record_audio(int iPicIndex);
	int session_enabled( BOOL iEnable);
	int set_audio( int iAudio);
	int set_beep_mode( int iBeepMode);
	int set_cgain( int iCgain);
	int set_color_bal( int iCbal);
	int set_color_mode( int iCmode);
	int set_compression( int iCompression);
	int set_datablock_size( int iSize);
	int set_debug( int iDebug); //NOT IMPLEMENTED
// Addr:10003B7C Ord: 112 (0070h) Name: _set_default_params@4
// Addr:1000523A Ord: 113 (0071h) Name: _set_diag_awb_info@4
// Addr:10004DE9 Ord: 114 (0072h) Name: _set_diag_buffer@8
// Addr:10004E19 Ord: 115 (0073h) Name: _set_diag_long@4
	int set_digital_zoom( int iZoom);
	int set_exposure( int iExposure);
	int set_exposure_bias( int iExposureBias);
	int set_flash_mode( int iFlashMode);
	int set_focal_length( pzoom_info pZoomInfo);
	int set_focus( int iFocus);
	int set_folder_name( PCHAR lpstrFolderName);
	int set_id( PCHAR lpstrId);
	int set_iso_speed_ratings( int iISO);
	int set_last_setting( int iLastSetting); // dummy
	int set_lcd_brightness( int iBrightness);
	int set_lcd_contrast( int iContrast);
	int set_lcd_date_format( int iFormat);
	int set_lcd_disp_direction( int iDirection); //dummy
	int set_lcd_disp_language( int iLang);
	int set_lcd_power_down( int iTime);
// Addr:1000412C Ord: 132 (0084h) Name: _set_lcd_power_down_2@8
	int set_lcd_string( PCHAR lpstrLCDString);
	int set_light_source( int iSource);
	int set_memory_select( int iMemorySelect);
	int set_metering_mode( int iMode);
	int set_packet_delay( int iDelay);
	int set_port( int iPort);
// Addr:100038BB Ord: 139 (008Bh) Name: _set_pwr_down@8
	int set_resolution( int iResolution);
	int set_session_time( int iTime);
	int set_sharpness( int iSharpness);
	int set_special_function( int iFunction);
	int set_speed( int iSpeed);
// Addr:10004BCA Ord: 145 (0091h) Name: _set_take_picture_info@4
	int set_time( int iTime);
	int set_timer_led( int iLed);
// Addr:10003B91 Ord: 148 (0094h) Name: _set_tone_curve@4
	int set_ygain( int iYgain);
	int setup_callback( int iCount, lpF5 lpCallbackProc);
//  _setup_monitor@4 - NOT IMPLEMENTED IN DLL
// Addr:10005610 Ord: 152 (0098h) Name: _store_pic@4
	int take_pic();
	int take_preview();
// Addr:10005511 Ord: 155 (009Bh) Name: _write_loaded_data@0
// Addr:10005DF5 Ord: 156 (009Ch) Name: _ComClose@4
// Addr:10006193 Ord: 157 (009Dh) Name: _ComGetHandle@4
// Addr:10005CC1 Ord: 158 (009Eh) Name: _ComOpen@32
// Addr:10006030 Ord: 159 (009Fh) Name: _ComPutc@8
// Addr:10005F4D Ord: 160 (00A0h) Name: _ComReadBufToQuiet@16
// Addr:10005E55 Ord: 161 (00A1h) Name: _ComReadTimed@16
// Addr:10006046 Ord: 162 (00A2h) Name: _ComSetBaud@8
// Addr:1000607E Ord: 163 (00A3h) Name: _ComSetFlow@8
// Addr:10006174 Ord: 164 (00A4h) Name: _ComSleepMS@8
// Addr:100059B0 Ord: 165 (00A5h) Name: _ComUsbOpen@12
// Addr:10005FB7 Ord: 166 (00A6h) Name: _ComWrite@12
	void reset_dll();


};